#ifndef LISTMODEL_H
#define LISTMODEL_H

#include <QAbstractListModel>
#include <QStyledItemDelegate>
#include <QModelIndex>
#include <QVariant>
#include <QPainter>

class ListModelDeleagate : public QStyledItemDelegate
{
	Q_OBJECT
public:
	ListModelDeleagate(QObject *parent = 0);
	QSize sizeHint(const QStyleOptionViewItem &option,
				   const QModelIndex &index) const;
	void paint (QPainter *painter, const QStyleOptionViewItem &option,
				const QModelIndex &index ) const;
};

class ListModel : public QAbstractListModel
{
	Q_OBJECT
private:

	class ListModelPrivate;
	ListModelPrivate *d;
public:
	explicit ListModel(QObject *parent = 0);
	~ListModel();

	int rowCount(const QModelIndex &parent = QModelIndex()) const;
	QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;

	void fillModel();
};

#endif // LISTMODEL_H
